{if $PageFlag eq 1}
{include file=$Config.ModulesFolder|cat:$Config.BlocksFolder|cat:"block.page_title.tpl" title=$PageTitleRubric}
{if $curr.params.showBack}
{include file=$Config.ModulesFolder|cat:$Config.BlocksFolder|cat:"block.show_back.tpl" curr=$curr}
{/if}
<div class="pbdiv">
{/if}

{if $curr.params.showTitle && $curr.rubrics_arr|@count > 0}
{include file=$Config.ModulesFolder|cat:$Config.BlocksFolder|cat:"block.show_title.tpl" Bold='true'}
{elseif $curr.params.showTitle && $curr.rubrics_arr|@count eq 0}
{include file=$Config.ModulesFolder|cat:$Config.BlocksFolder|cat:"block.show_title.tpl" title=$curr.title}
{/if}
{if $PageFlag eq 1}
{if $curr.params.showRubricsAuthor}
{include file=$Config.ModulesFolder|cat:$Config.BlocksFolder|cat:"block.show_rubric_author.tpl" curr=$curr}
{/if}
{if $curr.params.showRubricsAuthorComments}
{include file=$Config.ModulesFolder|cat:$Config.BlocksFolder|cat:"block.show_rubric_author_comments.tpl" curr=$curr}
{/if}

{if $curr.simple_article_arr|@count > 0}
{include file=$Config.ModulesFolder|cat:$Config.BlocksFolder|cat:"block.show_simple_article.tpl" curr=$curr}
{/if}

{$curr.body|unescape}

{if $curr.params.showKeywords}
{include file=$Config.ModulesFolder|cat:$Config.BlocksFolder|cat:"block.show_keywords.tpl" curr=$curr}
{/if}

{strip}
<script type="text/javascript">
var DialogBoxParams = {ldelim}
	animation:{ldelim}
		type:'fade',
		speed:500
	{rdelim},
	title:'{$lang.front.constantReference}',
	body:'<input style="width:100%" value="{$SameURL}">'
{rdelim};

var dialog = new DialogBox(DialogBoxParams);
</script>{/strip}
<div class="print_link">
  <a href="{$BaseURL}pview/{$curr.p_date|date_format:'%Y'}/{$curr.p_date|date_format:'%m'}/{$curr.p_date|date_format:'%d'}/{$curr.linkname}{$Config.webPageFileType}" target="_blank"><img src="{$HOST}img/printer.png" width="16" height="16" border="0" align="absbottom" /></a> <a href="{$BaseURL}pview/{$curr.p_date|date_format:'%Y'}/{$curr.p_date|date_format:'%m'}/{$curr.p_date|date_format:'%d'}/{$curr.linkname}{$Config.webPageFileType}" target="_blank">{$lang.front.printVersion|lower}</a>
  <a href="#" onclick="dialog.show({ldelim}cssClass:'dialog'{rdelim});return false;"><img src="{$HOST}img/anchor.png" width="16" height="16" border="0" align="absbottom" /></a> <a href="#" onclick="dialog.show({ldelim}cssClass:'dialog'{rdelim});return false;">{$lang.front.constantReference|lower}</a>
</div>
{*
<a href="{$BaseURL}share/t{$curr.id}{$Config.webPageFileType}" target="_blank"><img src="{$HOST}img/twitter.jpg" width="45" height="45" align="absmiddle" border="0" /></a><a href="{$BaseURL}share/f{$curr.id}{$Config.webPageFileType}" target="_blank"><img src="{$HOST}img/facebook.jpg" border="0" width="45" height="45" align="absmiddle" /></a><a href="{$BaseURL}share/l{$curr.id}{$Config.webPageFileType}" target="_blank"><img src="{$HOST}img/lj.jpg" alt="" width="45" height="45" border="0" align="absmiddle" /></a>
*}
{*
  {$lang.front.rating}: <strong>{$curr.rating}</strong>

  <form name="rating" method="post" action="">
  <input type="hidden" name="gact" value="rtng" />
  {section name=cnt loop=6 max=5 step=-1}
    <label><input type="radio" name="ans" value="{$smarty.section.cnt.index}" /> - {$smarty.section.cnt.index}</label>
  {/section}
  <input type="button" value="{$lang.front.toEstimate}" onclick="if(parseInt($(rating.ans).filter(':checked').val()))$(rating).submit();" />
  </form>
*}
{if $curr.params.showRubricsAuthorComments}
<div class="comments_links">
{if $curr.comments > 0}<img src="{$HOST}img/user_business.png" width="16" height="16" align="absmiddle" /><a href="{$SameURL}?show=all#comments">{$curr.comments} {$lang.front.comments|lower}</a> | {/if}<a href="{$SameURL}#addcomment">{$lang.front.addComment}</a>{if $curr.comments > 0} | <a href="{$SameURL}?show=all#comments">{$lang.front.allComments}</a>{/if}
</div>

<div id="comments">
{if $curr.comments > 0}
{include file=$Config.ModulesFolder|cat:$Config.BlocksFolder|cat:"block.comments.tpl" Comments=$curr.comments_list}
{/if}
</div>
<br /><br />
<div id="addcomment">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
  <td>{include file=$Config.ModulesFolder|cat:$Config.BlocksFolder|cat:"block.block_title.tpl" Title=$lang.front.addComment}</td>
</tr>
{if $User.info.id eq ''}
{*<tr>
  <td>{$lang.front.commentsOnlyRegisteredUsers}</td>
</tr>
<tr>
  <td>&nbsp;</td>
</tr>
<tr>
  <td><a href="{$BaseURL}login{$Config.webPageFileType}?r={$SameURL|cat:'#comments'|escape:'url'}">{$lang.user.enter}</a> | <a href="{$BaseURL}registration{$Config.webPageFileType}">{$lang.user.register}</a></td>
</tr> *}
<tr>
  <td>
    {include file=$Config.ModulesFolder|cat:$Config.BlocksFolder|cat:"block.errors.tpl" ErrorMessages=$ErrorMessages}
    <form name="comment" method="post" action="">
    <input type="hidden" name="nact" value="cmmnt" />
    <input type="hidden" name="root" value="0" />
    <table id="add_comment_tab">
      <tr>
        <td class="name">{$lang.contacts.name}:</td>
        <td class="value"><input type="text" class="slong" name="name" value="{if $smarty.post.name neq ''}{$smarty.post.name}{/if}" maxlength="20" size="48" /></td>
      </tr>
      <tr>
        <td class="name">{$lang.contacts.email}:</td>
        <td class="value"><input type="text" class="slong" name="email" value="{if $smarty.post.email neq ''}{$smarty.post.email}{/if}" maxlength="20" size="48" /></td>
      </tr>
      <tr>
        <td class="name">{$lang.contacts.message}:</td>
        <td class="value">
          <textarea name="body" class="g" id="textarea">{$smarty.post.body|strip_tags}</textarea>
        </td>
      </tr>
      <tr>
        <td class="name"></td>
        <td class="value">
          <img id="cptch" src="{$BaseURL}showcode{$Config.webPageFileType}?q={math equation='rand(1,99999)'}" width="{$Config.secureImageWidth}" height="{$Config.secureImageHeight}" border="0" align="absmiddle" />&nbsp;
          <a href="#" onclick="$('#cptch').attr('src', function(){ldelim}return $(this).attr('src')+'&'+Math.random(999);{rdelim});return false;"><img src="{$HOST}{$Config.MainImageFolder}cptchrld.png" border="0" height="20" width="20" align="absmiddle" alt="{$lang.front.reloadCaptchaImage}" title="{$lang.front.reloadCaptchaImage}" onclick="this.blur();" /></a>&nbsp;</td>
      </tr>
      <tr>
        <td class="name">{$lang.contacts.enterSecretCode}:</td>
        <td class="value"><input name="code" type="text" class="g" value="" size="15" maxlength="5" />&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value="{$lang.contacts.submitButton}" onclick="if($(comment.body).val()){ldelim}$(comment).submit();{rdelim}" /></td>
      </tr>
    </table>
    </form>
  </td>
</tr>
<tr>
  <td>&nbsp;</td>
</tr>
{else}
<tr>
  <td>
  {include file=$Config.ModulesFolder|cat:$Config.BlocksFolder|cat:"block.errors.tpl" ErrorMessages=$ErrorMessages}
  <div id="re" style="display:none">{$lang.front.answer}: <p id="repl"></p><p id="replt"></p> <a href="#" onclick="$('#repl').empty();$('#replt').empty();$('#re').hide();$(comment.root).val('0');return false;">{$lang.front.delete}</a></div>
  <form name="comment" method="post" action="">
    <input type="hidden" name="nact" value="cmmnt" />
    <input type="hidden" name="root" value="0" />
    <p>
      <label for="textarea"></label>
      {$lang.front.postYourComment}:<br />
      <textarea name="body" cols="45" rows="5" class="g" id="textarea">{$smarty.post.body|strip_tags}</textarea>
    </p>
    <p>
      <img id="cptch" src="{$BaseURL}showcode{$Config.webPageFileType}?q={math equation='rand(1,99999)'}" width="{$Config.secureImageWidth}" height="{$Config.secureImageHeight}" border="0" align="absmiddle" />&nbsp;
    <a href="#" onclick="$('#cptch').attr('src', function(){ldelim}return $(this).attr('src')+'&'+Math.random(999);{rdelim});return false;"><img src="{$HOST}{$Config.MainImageFolder}cptchrld.png" border="0" height="20" width="20" align="absmiddle" alt="{$lang.front.reloadCaptchaImage}" title="{$lang.front.reloadCaptchaImage}" onclick="this.blur();" /></a>&nbsp;
    </p>
    <p>
      <label for="textfield2"></label>
      {$lang.front.enterSecurityCode}:
      <input name="code" type="text" class="g" value="" size="5" maxlength="5" />
    </p>
    <p>
      <input type="button" value="{$lang.front.addComment}" onclick="if($(comment.body).val()){ldelim}$(comment).submit();{rdelim}" />
    </p>
  </form></td>

</tr>
<tr>
  <td>&nbsp;</td>
</tr>
{/if}
</table>
</div>
{/if}

<fb:comments href="{$BaseURL}news/{$curr.p_date|date_format:'%Y'}/{$curr.p_date|date_format:'%m'}/{$curr.p_date|date_format:'%d'}/{$curr.linkname}{$Config.webPageFileType}" target="_blank"><img src="{$HOST}img/printer.png" width="16" height="16" border="0" align="absbottom" /></a> <a href="{$BaseURL}pview/{$curr.p_date|date_format:'%Y'}/{$curr.p_date|date_format:'%m'}/{$curr.p_date|date_format:'%d'}/{$curr.linkname}{$Config.webPageFileType}" num_posts="10" width="615"></fb:comments>

</div>
{if $curr.params.showBack}
{include file=$Config.ModulesFolder|cat:$Config.BlocksFolder|cat:"block.show_back.tpl" curr=$curr}
{/if}
{elseif $PageFlag eq 2}
{include file=$Config.ModulesFolder|cat:$Config.BlocksFolder|cat:"block.page_title.tpl" title=$PageTitle}
{include file=$Config.ModulesFolder|cat:$Config.BlocksFolder|cat:"block.news_pages.tpl" Paging=$Paging News=$News}
{/if}

